package com.data.permission.rule.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 条件明细信息表
 * </p>
 *
 * @author zhangbo
 * @since 2019-11-03
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("RULE_CONDITION_DETAIL")
@ApiModel(value="RuleConditionDetail对象", description="条件明细信息表")
public class RuleConditionDetail implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "ID", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "条件编码")
    @TableField("CONDITION_CODE")
    private String conditionCode;

    @ApiModelProperty(value = "条件顺序")
    @TableField("CONDITION_ORDER")
    private Integer conditionOrder;

    @ApiModelProperty(value = "条件字段")
    @TableField("CONDITION_FIELD")
    private String conditionField;

    @ApiModelProperty(value = "条件标识符号：AND、OR、IN、NOT IN、EXISTS、NOT EXISTS、IS NULL、NOT NULL")
    @TableField("CONDITION_FLAG")
    private String conditionFlag;

    @ApiModelProperty(value = "校验类型：>、>=、<、<=、=、!=")
    @TableField("CHECK_TYPE")
    private String checkType;

    @ApiModelProperty(value = "数据来源：1：方法获取；2：自定义条件；3：集联SQL")
    @TableField("SOURCE_TYPE")
    private String sourceType;

    @ApiModelProperty(value = "数据来源，如：条件编号、类名 + 方法名、SQL语句")
    @TableField("DATA_SOURCE")
    private String dataSource;

    @ApiModelProperty(value = "有效标识，0：有效；1：无效")
    @TableField("DEL_IND")
    @TableLogic
    private String delInd;

    @ApiModelProperty(value = "创建时间")
    @TableField("CREATE_TIME")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "创建者")
    @TableField("CREATE_USER")
    private String createUser;

    @ApiModelProperty(value = "修改时间")
    @TableField("UPDATE_TIME")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "修改者")
    @TableField("UPDATE_USER")
    private String updateUser;


}
